public class Test {

    public static void main(String arg[]) {
        Integer x = 5;

        x = x + 5;
        System.out.println(x);

        System.out.println("90 度的正弦值：" + Math.sin(Math.PI / 2));
        //System.out.println(Math.PI);


        Integer a = 1000;
        Integer b = 1000;
        System.out.println(a == b);        // false
        System.out.println(a.equals(b));   // true

        char[] helloSay = {'r', 'u', 'n', 'o', 'o', 'b'};

        String hello = new String(helloSay);
        System.out.println(hello);

        String site = "你好11";
        Integer len = site.length();

        System.out.println(len);

        double[] myList = {1.2, 1.9, 2.2, 3};

        // 打印数组
        for (int i = 0; i < myList.length; i++) {
            System.out.println(myList[i] + " ");
        }

        // 计算所有元素的总和
        double total = 0;
        for (int i = 0; i < myList.length; i++) {
            total += myList[i];
        }
        System.out.println("Total is " + total);

        for (double element : myList) {
            System.out.println(element);
        }

    }
}
